package com.baseweb.webadmin.service.impl;

import com.baseweb.webadmin.core.model.bvo.PushMsgBvo;
import com.baseweb.webadmin.core.model.dao.MsgDao;
import com.baseweb.webadmin.core.model.pojo.PushRecord;
import com.baseweb.webadmin.core.model.pojo.PushRecordDetail;
import com.baseweb.webadmin.service.MsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2014/9/4.
 */
@Service
public class MsgServiceImpl implements MsgService{

    @Autowired
    private MsgDao msgDao;

    @Override
    public void insertPushRecord(PushRecord pushRecord) {
        msgDao.insertPushRecord(pushRecord);
    }

    @Override
    public void updatePushRecord(PushRecord pushRecord) {
        msgDao.updatePushRecord(pushRecord);
    }

    @Override
    public List<PushRecord> findPushRecords(Integer start, Integer offset,Integer status) {
        return msgDao.findPushRecords(start, offset, status);
    }

    @Override
    public Integer countPushRecords(Integer status) {
        return msgDao.countPushRecords(status);
    }

    @Override
    public PushRecord findPushRecordById(Integer id) {
        return msgDao.findPushRecordById(id);
    }

    @Override
    public void insertPushRecordDetail(PushRecordDetail pushRecordDetail) {
        msgDao.insertPushRecordDetail(pushRecordDetail);
    }

    @Override
    public void updatePushRecordDetail(PushRecordDetail pushRecordDetail) {
        msgDao.updatePushRecordDetail(pushRecordDetail);
    }

    @Override
    public List<PushRecordDetail> findPushRecordDetails(Integer pushRecordId,Integer start, Integer offset,Integer status) {
        return msgDao.findPushRecordDetails(pushRecordId, start, offset, status);
    }

    @Override
    public Integer countPushRecordDetails(Integer pushRecordId,Integer status) {
        return msgDao.countPushRecordDetails(pushRecordId, status);
    }

    @Override
    public PushRecordDetail findPushRecordDetailById(Integer id) {
        return msgDao.findPushRecordDetailById(id);
    }
}
